@if (count($reports))

<div style="margin-bottom:20px"></div>
<div class="row">

  @foreach ($reports as $report)
  <div class="col-sm-6 col-md-3">
    <div class="thumbnail">
      <a href="{{ route('reports.show', [$report->id]) }}">
        <img src="/assets/images/report.png" alt="{{$report->title}}">
        <div class="caption">
          <h4>{{$report->title}}</h4>
        </div>
      </a>
      <div class="media-body meta">

        <a href="{{ route('nodes.show', [$report->node->id]) }}" title="{{{ $report->node->name }}}" {{ $report->vote_count == 0 || 'class="remove-padding-left"'}}>
            {{{ $report->node->name }}}
        </a>

        @if ($report->vote_count >= 0)
          <span> • </span>
          <a href="{{ route('reports.show', [$report->id]) }}" class="remove-padding-left" id="pin-{{ $report->id }}">
            <span class="fa fa-thumbs-o-up"> {{ $report->vote_count }} </span>
          </a>
        @endif

        @if ($report->view_count >= 0)
          <span> • </span>
          <a href="{{ route('reports.show', [$report->id]) }}" class="remove-padding-left" id="pin-{{ $report->id }}">
            <span class="fa fa-eye"> {{ $report->view_count }} </span>
          </a>
        @endif

        @if ($report->rate != 0)
          <span> • </span>
          <a href="{{ route('reports.show', [$report->id]) }}" class="remove-padding-left" id="pin-{{ $report->id }}">
            <span>{{ $report->rate == 1 ? 'D' : ($report->rate == 2 ? 'C' : ($report->rate == 3 ? 'B' : ($report->rate == 4 ? 'A' : lang('Nothing'))))}}</span>
          </a>
        @endif

      </div>
    </div>
  </div>
  @endforeach

</div>

@else
   <div class="empty-block">{{ lang('Dont have any report yet') }}~~</div>
@endif
